home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / Nuntius 1.2 / src / Nuntius / UThreadApple.h < prev    next >
Encoding:
Text File  |  1994-03-13  |  825 b   |  40 lines  |  [TEXT/MPS ]

  1. // Copyright © 1993 Peter Speck (speck@dat.ruc.dk).  All rights reserved.
  2. // UThreadApple.h
  3.  
  4. #ifndef __UTHREAD__
  5. #include "UThread.h"
  6. #endif
  7.  
  8. #ifndef __THREADS__
  9. #include "Threads.h"
  10. #endif
  11.  
  12. class TThreadApple : public TThread
  13. {
  14.     public:
  15.         void StartThread(ThreadID threadID);
  16.         void CallSaveState();
  17.         void CallRestoreState();
  18.         virtual void DumpDebugDescription();
  19.  
  20.         TThreadApple();
  21.         virtual pascal void Initialize();
  22.         void IThreadApple(Boolean isMainThread, const char *debugDoingWhat);
  23.         virtual void Die();
  24.         
  25.     protected:
  26.         virtual pascal void Free(); // virtual ~TThreadApple();
  27.  
  28.         virtual void SwapThread();
  29.  
  30.     private:
  31.         ThreadID fThreadID;
  32.  
  33.         void InstallSwitchers();
  34. };
  35.  
  36. Boolean HasThreadApple();
  37. TThread *CreateMainThreadApple();
  38.  
  39. TThread *ExecuteInNewThreadApple(TCommand *command, const char *debugDoingWhat);
  40.